The present invention relates to computer software for initiating actions in response to user input, e.g., on an Internet web page. More particularly, an improved event model is provided using software components (designated xe2x80x9cFidgetsxe2x80x9d herein) which use fixed-format text strings to express event actions in a content delivery subsystem. In particular, the present invention provides a method for setting the event target property for a user event without the need to recompile software.
A fidget is a new type of software component defined by the present invention which can be implemented, e.g., as a front-end component (user interface) in an Internet application or the like. A fidget encapsulates some meaningful end-user functionality, which is more than just a simple control. A fidget has a server side component (for example, a JAVABean (trademark)) and a client side component (for example, hypertext markup language (HTML), JavaScript(trademark) code, a JAVA applet, or the like). Fidgets are created by an author referred to herein as an xe2x80x9cextender.xe2x80x9d
A fidget is part of a page, which page may contain other fidgets, as well as non-fidget information (e.g., static text and/or images). The page may be a Java Server page (JSP), which is a physical file residing on a server, or a virtual file which is constructed at run-time by a servlet or other server-side program. A page is constructed by a person referred to as a deployer, who decides which fidgets and non-fidget information to include in the page, and the arrangement of the fidget(s) and non-fidget information on the page. The deployer and the extender may be the same individual or different individuals. It is noted that the deployer could also be a computer, in a system where a web page or the like employing fidgets is designed by an intelligent computer system.
Prior art event models are very rigid. For example, in Sun Microsystems"" JavaBeans(trademark) event model, the source, target, and event action are expressed as JAVA code. The author of the target code decides which events to handle and how to handle them, and once the target is built, its event actions cannot be changed without rebuilding the code. As a result, the target can handle only a fixed set of events. The JavaBeans(trademark) event model is described in Sun Microsystems"" JavaBeans(trademark) Specification Version 1.01 (available for downloading or viewing at www.java.sun.com).
Microsoft""s ActiveX specification, as well as various graphical user interfaces (e.g., Microsoft Windows, Xwindows, JAVA AWT) also define event models. However, these event models are similar to the JavaBeans(trademark) model in their reliance on programming and their fixed nature. Netscape""s JavaScript(trademark) and Microsoft""s VBScript define event models using complex scripting languages and require considerable technical knowledge to code event actions.
All these prior art event models are procedural event models.
It would be advantageous to provide an event model that requires minimal technical expertise to implement. It would be further advantageous to provide an event model where the event actions are expressed using fixed-format text strings in a declarative fashion. It would be further advantageous to allow for the source and target to be flexibly defined as any of hypertext markup language, JavaScript(trademark), JAVA code, an arbitrary URL link, or the like. It would be even further advantageous to enable a deployer to specify the event target and to decide which events to handle and how to handle them. It would be still further advantageous to set the target properties and/or event action at deployment time.
The methods and apparatus of the present invention provide the aforesaid and other advantages.
The present invention relates to an improved event model using software components (designated xe2x80x9cFidgetsxe2x80x9d herein) which use fixed-format text strings to express event actions in a content delivery subsystem. In particular, the present invention provides a method for setting the event target property for a user event without the need to recompile software.
A fidget is created by a fidget author (the extender). The extender defines a set of user events which the fidget may generate at run-time. Each user event may have a set of named event parameters. The extender will also provide a fidget property for each user event, designated the event target. When creating a page, the deployer can use the event target to specify the action to be taken if and when the event occurs. The value of the event target property is a string which specifies a target frame and either an arbitrary URL or a page and zero or more target fidgets with a property to be called for each, as well as the order in which this is done. The event target string may be a fixed-format text string.
The deployer may include the names of event parameters in the target string (e.g., as property values or method arguments). When the event is fired at run-time, the names of the event parameters will be replaced by their actual values, which values may depend upon the state of the source fidget or on the user""s actions. The fidget author may provide a graphical user interface (editor) to simplify the process of specifying an event target string.
Events can be fired directly to the specified targets, if the source and target fidgets are on the same page and produce active renderings. Alternatively, the events can be fired to a server-side component (e.g., a JAVA Server Page (JSP)) which performs the specified action (for example, when the source or target is an HTML fidget).
A fidget can provide self-contained functionality. Alternatively, a fidget can be connected to other fidgets, either on the same page or on different pages. For example, a fidget which displays a list of items can be connected to a fidget which displays a single item in detail, to enable a user to select an item from the displayed list to be examined.
In an exemplary embodiment of the invention, a method of creating an event model in computer software for handling computer related user events is provided. A software component user interface (i.e. a fidget) is provided. A user event is defined which may be generated during the execution of the software component. The software component is provided with a set of event parameters relating to the user event. An event target property is set for the software component, which event target property is associated with the user event. For a given software component instance the event target property specifies an event action based on the set of event parameters. The event action is taken if and when the user event occurs. The event target property may be expressed using text strings.
In a preferred embodiment of the invention, the event target property can be set without recompiling the software. The text strings may comprise fixed format-text strings.
A graphical user interface may be provided for use (e.g., by the deployer) in specifying the event target property of the software component.
The user events may be implemented as JavaBean(trademark) events. The software component may be associated with a page, an object type, an extension server, a method of an extension server, or the like.
The invention also includes computer readable media, having thereon computer program code means for creating an event model in computer software for handling computer related user events as described above.
In an alternate embodiment of the invention, a method of handling computer related user events using software components is provided. A user request for a first server page (SP) is received at a server, said SP containing a source software component which identifies an event target. The source software component is rendered at the server and outputted to a user""s browser for display as part of a web page, the rendered source software component identifying a second SP having one or more target software components. The selection of a second SP is provided for, which selection is received at the server. Request parameters of the source software component are searched to locate event target parameters of the source software component at the second SP. The event target parameters of the source software component are executed at the second SP located during the searching step by setting an event property or invoking a method for each target software component of the second SP based on the event target parameters of the source software component. The one or more target software components are rendered at the server for output to a user""s browser. In this embodiment, the event target property of the source software component corresponds to a user event, and the event target property is expressed using text strings.
In a preferred embodiment, the text strings comprise fixed-format text strings.
The source software component may be rendered as hypertext markup language (HTML) and the user event may comprise an HTML link.
Alternately, the source software component may be rendered as JavaScript code and the user event may comprise one of (i) an HTTP request for the second SP, or (ii) a JavaScript(trademark) call to a target software component on the same page, which target software component is rendered as one of JavaScript(trademark) code or a JAVA applet.
Further, the source software component may be rendered as a JAVA applet and the user event may comprise one of (i) an HTTP request for the second SP, or (ii) a JAVA call to a target software component on the same page, which target software component is rendered as one of JavaScript(trademark) code or another JAVA applet.
In addition, the source software component may be rendered as XML (Extensible Markup Language) and the user event may comprise an XML Linking Language (Xlink) link to the second SP. XML is a specification developed by The World Wide Web Consortium (W3C).
The first SP and the second SP may comprise JAVA Server Pages, JAVA servlets, other Hypertext transfer Protocol (HTTP) server plugins, Common Gateway Interface (CGI) programs, or the like.
The user events may be implemented as JavaBean(trademark) events.
The invention also includes a computer readable media, having thereon computer program code means for handling computer related user events using software components as described above.